import numpy as np

# 模型输出
output = np.array([[-1.4738526 ,  1.866745  ],
                   [-0.26713222,  0.07013242],
                   [ 1.041047  , -1.9155945 ],
                   [-3.4628396 ,  5.4524126 ],
                   [ 1.3161677 ,  1.0480703 ],
                   [-1.0686519 ,  0.26824775]], dtype=np.float32)

# 转换为概率（softmax）
def softmax(x):
    e_x = np.exp(x - np.max(x, axis=1, keepdims=True))  # 防止溢出
    return e_x / np.sum(e_x, axis=1, keepdims=True)

probabilities = softmax(output)

# 获取预测类别
predicted_classes = np.argmax(probabilities, axis=1)

# 显示结果
for i, (probs, pred) in enumerate(zip(probabilities, predicted_classes)):
    label = "Human" if pred == 1 else "Bot"
    print(f"User {i}: {label} (Probabilities: Human={probs[1]:.2f}, Bot={probs[0]:.2f})")
